<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
</head>

<body>
    <script>
        let fn1 = new Promise(function (resolve, reject) {
            setTimeout(() => {
                resolve();
                console.log("A")
            }, 3000)
        })
        let fn2 = fn1.then(
            success => {
                return new Promise(function (resolve, reject) {
                    setTimeout(() => {
                        resolve();
                        console.log("B")
                    }, 1000)
                })
            }
        )
        fn2.then(
            success => {
                console.log("C")
            }
        )
    </script>
</body>

</html>